
import Yacc from "../../../main/js/com/1110111011101110/qexecute/entity/Yacc";

import src  from "./Rules.js"
import Syntax from "./Syntax";
import Switch from "./switch/Switch";

let srt1=[{type:'动作','data':'配置'},
    {type:'名词','data':'依赖'},
    {type:'和','data':'和'},
    {type:'名词','data':'启动'},
    {type:'名词','data':'文件'},
    {type:'符号','data':'，'},
    {type:'名词','data':'项目'},
    {type:'名词','data':'名称'},
    {type:'名词','data':'XXX'},
    {type:'符号','data':'，'},
    {type:'动作','data':'依赖'},
    {type:'名词','data':'都管'},
    {type:'名词','data':'核心'},
    {type:'符号','data':'、'},
    {type:'名词','data':'网页'},
    {type:'名词','data':'基础'},
    {type:'名词','data':'包'},
    {type:'符号','data':'。'}]



let yacc=new Yacc(src)

console.table(yacc.rules)
let yacc1=new Syntax(yacc)
let tree=yacc1.run(srt1,yacc)

let swit =new Switch()

let data=swit.run(tree)

let data2=data.findRun(8)
debugger
let data3=data.findRunData(8)
debugger
console.table(tree)
console.table(data)
console.table(data2)
console.table(data3)
